package study;

import org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer;
import org.jboss.resteasy.spi.ResteasyDeployment;

/**
 * Created by xux on 14-3-6.
 */
public class Server {

    public static NettyJaxrsServer netty;
    public static void main(String[] args) throws Exception {
    start();
    }

    public static void start() throws Exception {
        ResteasyDeployment dp = new ResteasyDeployment();
        dp.getResources().add(new Say());
        dp.getResources().add(new Test());

        netty = new NettyJaxrsServer();
        netty.setDeployment(dp);
        netty.setPort(9090);
        netty.setRootResourcePath("");
        netty.setSecurityDomain(null);
        netty.start();
    }
}
